package com.weicoder.shop.po

import javax.persistence.Entity
import org.hibernate.annotations.DynamicInsert
import org.hibernate.annotations.DynamicUpdate
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Component
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import com.weicoder.base.annotation.Cache
import com.weicoder.base.entity.EntityUserId
import com.weicoder.site.entity.base.BaseEntityId;
import scala.beans.BeanProperty

/**
 * 收货地址
 * @author WD
 * @since JDK7
 * @version 1._ 2_12-_7-26
 */
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
@Entity
@DynamicInsert
@DynamicUpdate
@Cache
class Receiver extends BaseEntityId with EntityUserId {
  // 名称
  @BeanProperty
  var name: String = _
  // 用户ID
  @BeanProperty
  var userId: Integer = _
  // 地区ID
  @BeanProperty
  var areaId: Integer = _
  // 手机
  @BeanProperty
  var mobile: String = _
  // 电话
  @BeanProperty
  var phone: String = _
  // 收货地址
  @BeanProperty
  var address: String = _
  // 邮编
  @BeanProperty
  var zipCode: Integer = _
}
